package com.example.springsecurity.service.impl;

import com.example.springsecurity.domain.Role;
import com.example.springsecurity.domain.SysUser;
import com.example.springsecurity.mapper.RoleMapper;
import com.example.springsecurity.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * @ClassName RoleServiceImpl
 * @Description TODO
 * @Author lvyongwei
 * @Date 2020-08-19 16:16
 **/
@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    /**
     * 根据用户信息查询对应得角色信息
     */
    @Override
    public Set<String> getAllRole(SysUser sysUser) {
        return roleMapper.getAllRole(sysUser);
    }

    /**
     * 获取所有用户信息
     * @return
     */
    @Override
    public Set<Role> selectAllRole() {
        return roleMapper.selectAllRole();
    }
}
